<?php
namespace app\install\controller;
use think\Controller;
class Index extends Controller
{
    public function index()
    {
    	#检查是否已经安装过程序
  	 	if(is_file(APP_PATH.'database.php')){
    		return '已经安装过程序，为了安全请删除install目录';
    	}else{
    		#输出到安装页面
    		return $this->fetch();
    	}
    	
    }
    public function complate(){
        if (session('step') !=2){
            $this->redirect('Install/step1');
        }
        $username=session('admin_info')['username'];
        $this->assign('username',$username);
        session(null);
    	return $this->fetch();
    }

}
